<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>GoodFETMCPCANCommunication.GoodFETMCPCANCommunication</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="GoodFETMCPCANCommunication-module.html">Module&nbsp;GoodFETMCPCANCommunication</a> ::
        Class&nbsp;GoodFETMCPCANCommunication
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class GoodFETMCPCANCommunication</h1><p class="nomargin-top"><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication">source&nbsp;code</a></span></p>
<dl><dt>Known Subclasses:</dt>
<dd>
      <ul class="subclass-list">
<li><a href="experiments.experiments-class.html">experiments.experiments</a></li>  </ul>
</dd></dl>

<hr />
<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">dataLocation</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">../../contrib/ThayerData/</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#printInfo" class="summary-sig-name">printInfo</a>(<span class="summary-sig-arg">self</span>)</span><br />
      This method will print information about the board to the terminal.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.printInfo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="reset"></a><span class="summary-sig-name">reset</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Reset the chip</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.reset">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="sniff"></a><span class="summary-sig-name">sniff</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>,
        <span class="summary-sig-arg">duration</span>,
        <span class="summary-sig-arg">description</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">comment</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">filename</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">standardid</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">debug</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">faster</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">parsed</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">data</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">writeToFile</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">db0</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">db1</span>=<span class="summary-sig-default">None</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.sniff">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#sniffTest" class="summary-sig-name">sniffTest</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>)</span><br />
      This method will preform a test to see if we can sniff corretly 
      formed packets from the CAN bus.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.sniffTest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#freqtest" class="summary-sig-name">freqtest</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>)</span><br />
      This method will test the frequency provided to see if it is the 
      correct frequency for this CAN bus.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.freqtest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="isniff"></a><span class="summary-sig-name">isniff</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>)</span><br />
      An intelligent sniffer, decodes message format</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.isniff">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#test" class="summary-sig-name">test</a>(<span class="summary-sig-arg">self</span>)</span><br />
      This will perform a test on the GOODTHOPTER10.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.test">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#addFilter" class="summary-sig-name">addFilter</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">standardid</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>)</span><br />
      This method will configure filters on the board.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.addFilter">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">None</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#filterForPacket" class="summary-sig-name">filterForPacket</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">standardid</span>,
        <span class="summary-sig-arg">DB0</span>,
        <span class="summary-sig-arg">DB1</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">True</span>)</span><br />
      This method will configure filters on the board to listen for a 
      specific packet originating from standardid with data bytes 0 and 1.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.filterForPacket">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="multiPacketTest"></a><span class="summary-sig-name">multiPacketTest</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.multiPacketTest">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#multiPacketSpit" class="summary-sig-name">multiPacketSpit</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">packet0</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">packet1</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">packet2</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">packet0rts</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">packet1rts</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">packet2rts</span>=<span class="summary-sig-default">False</span>)</span><br />
      This method writes packets to the chip's TX buffers and/or sends the 
      contents of the buffers onto the bus.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.multiPacketSpit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="spitSetup"></a><span class="summary-sig-name">spitSetup</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>)</span><br />
      This method sets up the chip for transmitting messages, but does not 
      transmit anything itself.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.spitSetup">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#spitSingle" class="summary-sig-name">spitSingle</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>,
        <span class="summary-sig-arg">standardid</span>,
        <span class="summary-sig-arg">repeat</span>,
        <span class="summary-sig-arg">writes</span>,
        <span class="summary-sig-arg">period</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">debug</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">packet</span>=<span class="summary-sig-default">None</span>)</span><br />
      This method will spit a single message onto the bus.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.spitSingle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#spit" class="summary-sig-name">spit</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>,
        <span class="summary-sig-arg">standardid</span>,
        <span class="summary-sig-arg">repeat</span>,
        <span class="summary-sig-arg">writes</span>,
        <span class="summary-sig-arg">period</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">debug</span>=<span class="summary-sig-default">False</span>,
        <span class="summary-sig-arg">packet</span>=<span class="summary-sig-default">None</span>)</span><br />
      This method will spit a single message onto the bus.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.spit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#setRate" class="summary-sig-name">setRate</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">freq</span>)</span><br />
      This method will reset the frequency that the MCP2515 expects the CAN
      bus to be on.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.setRate">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#writeData" class="summary-sig-name">writeData</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">packets</span>,
        <span class="summary-sig-arg">freq</span>)</span><br />
      This method will write a list of packets to the bus at the given 
      frequency.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.writeData">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== INSTANCE VARIABLES ==================== -->
<a name="section-InstanceVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="INJECT_DATA_LOCATION"></a><span class="summary-name">INJECT_DATA_LOCATION</span><br />
      stores the sub folder path where injected data will be stored
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="printInfo"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">printInfo</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.printInfo">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will print information about the board to the terminal. It
  is good for diagnostics.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="sniffTest"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">sniffTest</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">freq</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.sniffTest">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will preform a test to see if we can sniff corretly formed
  packets from the CAN bus.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>freq</code></strong> (number) - frequency of the CAN bus</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="freqtest"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">freqtest</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">freq</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.freqtest">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will test the frequency provided to see if it is the 
  correct frequency for this CAN bus.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>freq</code></strong> (Number) - The frequency to listen to the CAN bus.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="test"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">test</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.test">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This will perform a test on the GOODTHOPTER10. Diagnostic messages 
  will be printed out to the terminal</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="addFilter"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">addFilter</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">standardid</span>,
        <span class="sig-arg">verbose</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.addFilter">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will configure filters on the board. Filters are positive 
  filters meaning that they will only store messages that match the ids 
  provided in the list of standardid. Since there are 2 buffers and due to 
  the configuration of how the filtering works (see MCP2515 documentation),
  at least 3 filters must be set to guarentee you do not get any unwanted 
  messages. However even with only 1 filter set you should get all messages
  from that ID but the other buffer will store any additional messages.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>standardid</code></strong> (list of integers) - List of standard ids that need to be set. There can be at most 6 
          filters set.</li>
        <li><strong class="pname"><code>verbose</code></strong> (Boolean) - If true it will print out messages and diagnostics to terminal.</li>
    </ul></dd>
    <dt>Returns: None</dt>
        <dd>This method does not return anything</dd>
  </dl>
<div class="fields">      <p><strong>To Do:</strong>
        rename setFilters
      </p>
</div></td></tr></table>
</div>
<a name="filterForPacket"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">filterForPacket</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">standardid</span>,
        <span class="sig-arg">DB0</span>,
        <span class="sig-arg">DB1</span>,
        <span class="sig-arg">verbose</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.filterForPacket">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will configure filters on the board to listen for a 
  specific packet originating from standardid with data bytes 0 and 1. It 
  will configure all six filters, so you will not receive any other 
  packets.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>standardid</code></strong> (integer) - standardID to listen for</li>
        <li><strong class="pname"><code>standardid</code></strong> (integer) - DB0 contents to filter for</li>
        <li><strong class="pname"><code>standardid</code></strong> (integer) - DB1 contents to filter for</li>
        <li><strong class="pname"><code>verbose</code></strong> (Boolean) - If true it will print out messages and diagnostics to terminal.</li>
        <li><strong class="pname"><code>DB1</code></strong> (integer)</li>
        <li><strong class="pname"><code>DB0</code></strong> (integer)</li>
    </ul></dd>
    <dt>Returns: None</dt>
        <dd>This method does not return anything</dd>
  </dl>
</td></tr></table>
</div>
<a name="multiPacketSpit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">multiPacketSpit</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">packet0</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">packet1</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">packet2</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">packet0rts</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">packet1rts</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">packet2rts</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.multiPacketSpit">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method writes packets to the chip's TX buffers and/or sends the 
  contents of the buffers onto the bus.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>packet0</code></strong> (list of integer) - A list of 13 integers of the format [SIDhigh SIDlow 0 0 DLC 
          DB0-7] to be loaded into TXBF0</li>
        <li><strong class="pname"><code>packet1</code></strong> (list of integer) - A list of 13 integers of the format [SIDhigh SIDlow 0 0 DLC 
          DB0-7] to be loaded into TXBF1</li>
        <li><strong class="pname"><code>packet2</code></strong> (list of integer) - A list of 13 integers of the format [SIDhigh SIDlow 0 0 DLC 
          DB0-7] to be loaded into TXBF2</li>
        <li><strong class="pname"><code>packet0rts</code></strong> (Boolean) - If true the message in TX buffer 0 will be sent</li>
        <li><strong class="pname"><code>packet0rts</code></strong> (Boolean) - If true the message in TX buffer 1 will be sent</li>
        <li><strong class="pname"><code>packet0rts</code></strong> (Boolean) - If true the message in TX buffer 2 will be sent</li>
        <li><strong class="pname"><code>packet2rts</code></strong> (Boolean)</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="spitSingle"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">spitSingle</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">freq</span>,
        <span class="sig-arg">standardid</span>,
        <span class="sig-arg">repeat</span>,
        <span class="sig-arg">writes</span>,
        <span class="sig-arg">period</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">debug</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">packet</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.spitSingle">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will spit a single message onto the bus. If there is no 
  packet information provided then the message will be sent as a remote 
  transmission request (RTR). The packet length is assumed to be 8 bytes 
  The message can be repeated given number of times with a gap of period 
  (milliseconds) between each message. This will continue for the the 
  number of times specified in the writes input. This method will setup the
  bus and call the spit method, <a 
  href="GoodFETMCPCANCommunication.GoodFETMCPCANCommunication-class.html#spit"
  class="link">spit</a>. This method includes a bus reset and 
  initialization.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>freq</code></strong> (number) - The frequency of the bus</li>
        <li><strong class="pname"><code>standardid</code></strong> (list of integer) - This is a single length list with one integer elment that 
          corresponds to the standard id you wish to write to</li>
        <li><strong class="pname"><code>repeat</code></strong> (Boolean) - If true the message will be repeatedly injected. if not the 
          message will only be injected 1 time</li>
        <li><strong class="pname"><code>writes</code></strong> (Integer) - Number of writes of the packet</li>
        <li><strong class="pname"><code>period</code></strong> (Integer) - Time delay between injections of the packet in Milliseconds</li>
        <li><strong class="pname"><code>debug</code></strong> (Boolean) - When true debug status messages will be printed to the terminal</li>
        <li><strong class="pname"><code>packet</code></strong> (List) - Contains the data bytes for the packet which is assumed to be of 
          length 8. Each byte is stored as an integer and can range from 0 
          to 255 (8 bits). If packet == None then an RTR will be sent on 
          the given standard id.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="spit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">spit</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">freq</span>,
        <span class="sig-arg">standardid</span>,
        <span class="sig-arg">repeat</span>,
        <span class="sig-arg">writes</span>,
        <span class="sig-arg">period</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">debug</span>=<span class="sig-default">False</span>,
        <span class="sig-arg">packet</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.spit">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will spit a single message onto the bus. If there is no 
  packet information provided then the message will be sent as a remote 
  transmission request (RTR). The packet length is assumed to be 8 bytes 
  The message can be repeated a given number of times with a gap of period 
  (milliseconds) between each message. This will continue for the the 
  number of times specified in the writes input. This method does not 
  include bus setup, it must be done before the method call.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>freq</code></strong> (number) - The frequency of the bus</li>
        <li><strong class="pname"><code>standardid</code></strong> (list of integer) - This is a single length list with one integer element that 
          corresponds to the standard id you wish to write to</li>
        <li><strong class="pname"><code>repeat</code></strong> (Boolean) - If true the message will be repeatedly injected. if not the 
          message will only be injected 1 time</li>
        <li><strong class="pname"><code>writes</code></strong> (Integer) - Number of writes of the packet</li>
        <li><strong class="pname"><code>period</code></strong> (Integer) - Time delay between injections of the packet in Milliseconds</li>
        <li><strong class="pname"><code>debug</code></strong> (Boolean) - When true debug status messages will be printed to the terminal</li>
        <li><strong class="pname"><code>packet</code></strong> (List) - Contains the data bytes for the packet which is assumed to be of 
          length 8. Each byte is stored as an integer and can range from 0 
          to 255 (8 bits). If packet == None then an RTR will be sent on 
          the given standard id.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="setRate"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">setRate</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">freq</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.setRate">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will reset the frequency that the MCP2515 expects the CAN 
  bus to be on.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>freq</code></strong> (Number) - Frequency of the CAN bus</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="writeData"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">writeData</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">packets</span>,
        <span class="sig-arg">freq</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="GoodFETMCPCANCommunication-pysrc.html#GoodFETMCPCANCommunication.writeData">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>This method will write a list of packets to the bus at the given 
  frequency. This method assumes a packet length of 8 for all packets as 
  well as a standard id.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>packets</code></strong> (List of Lists) - The list of packets to be injected into the bus. Each element of 
          packets is a list that is a packet to be injected onto the bus. 
          These packets are assumed to be in the following format:
<pre class="literalblock">
        row[0] = time delay relative to the last packet. 
                 if 0 or empty there will be no delay
        row[1] = Standard ID (integer)
        row[2] = Data Length (0-8)
                  (if it is zero we assume an Remote Transmit Request)
        row[3] = Data Byte 0
        row[4] = Data Byte 1
        ...
        row[10] = Data Byte 7
</pre></li>
        <li><strong class="pname"><code>freq</code></strong> (number) - Frequency of the CAN bus</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Mar  6 20:20:31 2013
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
